import "./index.less";

function buildPostTitle(){
  let $postDesc = $(".postDesc").clone();
  let $spans = $postDesc.find("span").clone();
  let $as = $postDesc.find("a").clone();

  let bluepoint = $(`
    <div class="post-desc">
        <div class="post-date item">posted @ ${$spans[0].innerText}</div>
        <div class="read-num item">阅读(${$spans[1].innerText})</div>
        <div class="comm-num item">评论(${$spans[2].innerText})</div>
        <div class="edit-btn item"><a href="${$as[2].href}" target="_blank">${$as[2].innerText}</a></div>
    </div>
    <div class="koic-cutline">Beginning</div>
  `);

  $(".postTitle").after(bluepoint);

}

export default buildPostTitle;